home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20021006-20030409
/
000306_jaltman@watsun.cc.columbia.edu_Fri Feb 14 10:01:02 EST 2003.msg
< prev
next >
Wrap
Text File
|
2003-04-08
|
3KB
|
74 lines
Article: 14102 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!watsun.cc.columbia.edu!jaltman
From: jaltman@watsun.cc.columbia.edu (Jeffrey Altman)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Dealing with '\' char in strings of file locations
Date: 14 Feb 2003 05:58:53 GMT
Organization: Columbia University
Lines: 57
Message-ID: <b2i0it$lfs$1@newsmaster.cc.columbia.edu>
References: <a70f50e.0302121525.7922c8c3@posting.google.com> <a70f50e.0302131451.4fe831f@posting.google.com> <b2h8jd$dp7$1@watsol.cc.columbia.edu>
NNTP-Posting-Host: watsun.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 1045202333 22012 128.59.39.2 (14 Feb 2003 05:58:53 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 14 Feb 2003 05:58:53 GMT
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14102
Just FYI:
The hostname portion of the UNC path must use backslashes. They cannot be
replaced with forward slashes. When command quoting is ON, you must
represent it as
\\\\hostname\\dir\\subdir\\file.txt
or
\\\\hostname\\dir/subdir/file.txt
In article <b2h8jd$dp7$1@watsol.cc.columbia.edu>,
Frank da Cruz <fdc@columbia.edu> wrote:
: In article <a70f50e.0302131451.4fe831f@posting.google.com>,
: Wes <wesdog@hotmail.com> wrote:
: : I have learned alot since my last post... I believe I understand the
: : difference between ASSIGN, EVALUATE and DEFINE.
: :
: : However I am still having trouble getting my mind around parsing UNC
: : paths. I have a UNC path "\\myserver\dir\subdir\file.txt" in the same
: : location of each line (char 50 through 300 is reserved for the UNC,
: : whitespace fills in what isnt used).
: :
: Let's assume the UNC is stored in a macro (variable) called line, and
: that it's left-adjusted in columns 50-300, right-padded by spaces.
:
: assign unc \ftrim(\fsubstr(\m(line),50,250))
:
: This extracts the UNC and trims trailing blanks. Now we can change those
: pesky backslashes into harmless "forward" slashes:
:
: assign unc \freplace(\m(unc),\\,/)
:
: Now the \m(unc) value is:
:
: //myserver/dir/subdir/file.txt
:
: Of course all this could be combined into one statement:
:
: assign unc \ftrim(\fsubstr(\freplace(\m(line),\\,/),50,250))
:
: Now to whack off the unwanted parts, you can use:
:
: void \fsplit(\m(unc),&a,/)
: asg \%n \fdim(&a)
: asg path \&a[\%n-1]/\&a[\%n]
:
: - Frank
Jeffrey Altman * Volunteer Developer Kermit 95 2.1 GUI available now!!!
The Kermit Project @ Columbia University SSH, Secure Telnet, Secure FTP, HTTP
http://www.kermit-project.org/ Secured with MIT Kerberos, SRP, and
kermit-support@columbia.edu OpenSSL.